package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.Area;
import com.realtyManage.springboot.Model.Do.HouseDynamic;
import com.realtyManage.springboot.Model.Do.ProjectDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * 项目信息
 *
 * @author 杭州素色网络科技有限公司
 * @since 2019-10-14
 */

@Repository
public interface ProjectDetailRepository extends JpaRepository<ProjectDetail, Integer>, JpaSpecificationExecutor<ProjectDetail> {

    @Modifying
    @Query(value = "SELECT * FROM `house_dynamic` ORDER BY insert_time DESC LIMIT 5",nativeQuery = true)
    List<HouseDynamic> showNewHouseDynamic();

}
